/*
 * charutil.h
 *
 *  Created on: 2012-10-9
 *      Author: yangentao@gmail.com
 */

#pragma once;
#include <windows.h>

namespace yet{

inline WORD lowerChar(WORD ch) {
	if (ch >= 'A' && ch <= 'Z') {
		return ch - 'A' + 'a';
	}
	return ch;
}
inline char lowerChar(char ch) {
	if (ch >= 'A' && ch <= 'Z') {
		return ch - 'A' + 'a';
	}
	return ch;
}

inline WORD upperChar(WORD ch) {
	if (ch >= 'a' && ch <= 'z') {
		return ch - 'a' + 'A';
	}
	return ch;
}
inline char upperChar(char ch) {
	if (ch >= 'a' && ch <= 'z') {
		return ch - 'a' + 'A';
	}
	return ch;
}

}
